package com.wyman.context.support;

/**
 * @Author 李伟民
 * @Description
 * @DateTime 2024/12/12 19:27
 */
public class ClassPathXmlApplicationContext extends AbstractXmlApplicationContext{

    private String[] configLocations;

    public ClassPathXmlApplicationContext(){

    }

    public ClassPathXmlApplicationContext(String configLocations){
        this(new String[]{configLocations});
    }

    //真正完成容器上下文初始化的动作就发生在构造方法中 传入类路径 之后完成上下文初始化
    public ClassPathXmlApplicationContext(String[] configLocations){
        this.configLocations = configLocations;
        refresh();
    }

    @Override
    public String[] getConfigLocations() {
        return configLocations;
    }
}
